package com.hsmpay.mobile.service.user;

import com.hsmpay.common.service.MemcachedService;

import java.io.Serializable;

/**
 * 注册用户手机验证码 业务接口 registerCodeService
 * 对应数据层 没有
 *
 * @param <Entity>
 * @param <Query>
 * @author 颜铃璋
 * @date 2013-1-6
 */
public interface RegisterCodeService<Entity extends Serializable, Query extends Object> extends MemcachedService<Entity, Query> {
    /**
     * 保存手机验证码 到memcache
     *
     * @param mobile
     * @param code
     * @return
     * @throws Exception
     */
    public boolean savaRegisterCodeToMemcache(String mobile, String code) throws Exception;

    /**
     * 从memcache中取出 手机验证码
     *
     * @param mobile
     * @return
     * @throws Exception
     */
    public String getRegisterCodeToMemcache(String mobile) throws Exception;
}
